package API.Stream.Practise;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class FilterData {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            list.add(i);
        }
        list = list.stream().filter(s -> s % 2 == 0).collect(Collectors.toList());
        System.out.println(list);
    }
}
